

export function matchRole(type) {
  let userInfo = JSON.parse(sessionStorage.getItem("userInfo"))
  if (type == 'admin') {
    return userInfo.type == 1
  }
  if (type == 'doctor') {
    return userInfo.type == 1
  }
  if (type == 'user') {
    return userInfo.type == 3
  }
  return false
}
